package smn.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import smn.dao.manager.IUserManager;
import smn.domain.MyUser;

/**
 * User: Abdulaziz
 * Date: 1/8/12
 * Time: 10:00 PM
 */
 @org.springframework.stereotype.Controller(value = "/")
public class TestConrroller{
   @Autowired
   IUserManager userManager;

    @RequestMapping(value = "/test.html")
    public String handleRequest(){
        MyUser user = new MyUser();
        user.setFirstName("Aziz");
        user.setUsername("aziz");

        userManager.persist(user);
        return "index.jsp";
    }
}
